package com.sci.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sci.entity.Orders;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper extends BaseMapper<Orders> {
    @Select("select * from orders where wechat_id = #{wechatId}")
    List<Orders> selectByWechatId(String wechatId);

    @Insert("INSERT INTO orders (order_id, business_id, phone, status, note, address) " +
            "VALUES (#{orderId}, #{businessId}, #{phone}, #{status}, #{note}, #{address})")
    void insertOrder(Orders order);
}
